3.5.85 \(\int (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^n \, dx\) [485]
Optimal. Leaf size=148 \[ \frac {i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^n}{d (2-n)}-\frac {2 i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{1+n}}{a d (2-n) n}+\frac {2 i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{2+n}}{a^2 d n \left (4-n^2\right )} \]
[Out]
I*(e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^n/d/(2-n)-2*I*(e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^(1+n)/a/d/(2
-n)/n+2*I*(e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^(2+n)/a^2/d/n/(-n^2+4)
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 148, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {3585, 3569}
\begin {gather*} \frac {2 i (a+i a \tan (c+d x))^{n+2} (e \sec (c+d x))^{-n-2}}{a^2 d n \left (4-n^2\right )}+\frac {i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n-2}}{d (2-n)}-\frac {2 i (a+i a \tan (c+d x))^{n+1} (e \sec (c+d x))^{-n-2}}{a d (2-n) n} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[(e*Sec[c + d*x])^(-2 - n)*(a + I*a*Tan[c + d*x])^n,x]
[Out]
(I*(e*Sec[c + d*x])^(-2 - n)*(a + I*a*Tan[c + d*x])^n)/(d*(2 - n)) - ((2*I)*(e*Sec[c + d*x])^(-2 - n)*(a + I*a
*Tan[c + d*x])^(1 + n))/(a*d*(2 - n)*n) + ((2*I)*(e*Sec[c + d*x])^(-2 - n)*(a + I*a*Tan[c + d*x])^(2 + n))/(a^
2*d*n*(4 - n^2))
Rule 3569
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(d*
Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/(a*f*m)), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] &
& EqQ[Simplify[m + n], 0]
Rule 3585
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(d*
Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/(b*f*(m + 2*n))), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] && IL
tQ[Simplify[m + n], 0] && NeQ[m + 2*n, 0]
Rubi steps
\begin {align*} \int (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^n \, dx &=\frac {i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^n}{d (2-n)}+\frac {2 \int (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{1+n} \, dx}{a (2-n)}\\ &=\frac {i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^n}{d (2-n)}-\frac {2 i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{1+n}}{a d (2-n) n}-\frac {2 \int (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{2+n} \, dx}{a^2 (2-n) n}\\ &=\frac {i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^n}{d (2-n)}-\frac {2 i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{1+n}}{a d (2-n) n}+\frac {2 i (e \sec (c+d x))^{-2-n} (a+i a \tan (c+d x))^{2+n}}{a^2 d n \left (4-n^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.30, size = 82, normalized size = 0.55 \begin {gather*} -\frac {i (e \sec (c+d x))^{-n} \left (-4+n^2+n^2 \cos (2 (c+d x))-2 i n \sin (2 (c+d x))\right ) (a+i a \tan (c+d x))^n}{2 d e^2 (-2+n) n (2+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[(e*Sec[c + d*x])^(-2 - n)*(a + I*a*Tan[c + d*x])^n,x]
[Out]
((-1/2*I)*(-4 + n^2 + n^2*Cos[2*(c + d*x)] - (2*I)*n*Sin[2*(c + d*x)])*(a + I*a*Tan[c + d*x])^n)/(d*e^2*(-2 +
n)*n*(2 + n)*(e*Sec[c + d*x])^n)
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 1.02, size = 3327, normalized size = 22.48
| | |
method |
result |
size |
| | |
risch |
\(\text {Expression too large to display}\) |
\(3327\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^n,x,method=_RETURNVERBOSE)
[Out]
1/4*exp(I*(d*x+c))^n*e^(-n)*a^n/e^2*exp(-1/2*I*(4*c-n*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c)))*c
sgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))+4*d*x-n*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3+2*Pi*csgn(
I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*e)+n*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn
(I*e)+n*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))+n*Pi*cs
gn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2+n*Pi*csgn(I*exp(I*(d*x+c)))*csgn(I*ex
p(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2-2*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))*csgn(I*e)*csgn(I*exp(I
*(d*x+c))/(exp(2*I*(d*x+c))+1))+2*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^
2+2*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-n*Pi*csgn(I
*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^3-2*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3-2*Pi*csgn(I*e/(ex
p(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^3+Pi*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^3*n+Pi*csgn(I/(exp(2*I*
(d*x+c))+1)*exp(2*I*(d*x+c)))^3*n+Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*cs
gn(I/(exp(2*I*(d*x+c))+1))*n+2*Pi*csgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2+Pi*csgn
(I*exp(2*I*(d*x+c)))^3*n+Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*
I*(d*x+c)))*csgn(I*a)*n-Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I
*(d*x+c)))^2*n-2*Pi*csgn(I*exp(2*I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c)))*n-n*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp
(I*(d*x+c)))*csgn(I*e)*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-2*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*ex
p(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-Pi*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2
*csgn(I*a)*n-Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2*n+Pi*csgn(I*exp(2*I*(
d*x+c)))*csgn(I*exp(I*(d*x+c)))^2*n-Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2*csgn(I/(exp(2*I*(d*x+c)
)+1))*n))/(-2*I*d+I*n*d)+1/4*exp(I*(d*x+c))^n*e^(-n)*a^n/e^2*exp(1/2*I*(4*c+n*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*
csgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))+4*d*x+n*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(
d*x+c))+1))^3-2*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*e)-n*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1
)*exp(I*(d*x+c)))^2*csgn(I*e)-n*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c))/(exp(
2*I*(d*x+c))+1))-n*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2-n*Pi*csgn(I*e
xp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2+2*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c))
)*csgn(I*e)*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-2*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c)
)/(exp(2*I*(d*x+c))+1))^2-2*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c))/(exp(2*I*
(d*x+c))+1))+n*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^3+2*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))
+1))^3+2*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^3-Pi*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))
^3*n-Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^3*n-Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))
+1)*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1))*n-2*Pi*csgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*
I*(d*x+c))+1))^2-Pi*csgn(I*exp(2*I*(d*x+c)))^3*n-Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a/(ex
p(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a)*n+Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a/(exp
(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2*n+2*Pi*csgn(I*exp(2*I*(d*x+c)))^2*csgn(I*exp(I*(d*x+c)))*n+n*Pi*csgn(I*e/
(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))*csgn(I*e)*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))+2*Pi*csgn(I/(exp(2*
I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))+Pi*csgn(I*a/(exp(2*I*(d*x+c)
)+1)*exp(2*I*(d*x+c)))^2*csgn(I*a)*n+Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))
^2*n-Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I*exp(I*(d*x+c)))^2*n+Pi*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2
*csgn(I/(exp(2*I*(d*x+c))+1))*n))/(2*I*d+I*n*d)-1/2*I/d/n*a^n*exp(I*(d*x+c))^n/(e^n)/e^2*exp(1/2*I*n*Pi*(csgn(
I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))*csgn(I*e)*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-csgn(I*e/(exp(2
*I*(d*x+c))+1)*exp(I*(d*x+c)))^2*csgn(I*e)-csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c)
)+1))^2+csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-csgn(I
*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1))+csgn(I/(exp(2*I*
(d*x+c))+1)*exp(2*I*(d*x+c)))^2*csgn(I/(exp(2*I*(d*x+c))+1))+csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3-csg
n(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2-csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c))
)^2*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))...
________________________________________________________________________________________
Maxima [A]
time = 0.59, size = 173, normalized size = 1.17 \begin {gather*} \frac {{\left ({\left (-i \, a^{n} n^{2} + 2 i \, a^{n} n\right )} \cos \left ({\left (d x + c\right )} {\left (n + 2\right )}\right ) + {\left (-i \, a^{n} n^{2} - 2 i \, a^{n} n\right )} \cos \left ({\left (d x + c\right )} {\left (n - 2\right )}\right ) - 2 \, {\left (i \, a^{n} n^{2} - 4 i \, a^{n}\right )} \cos \left ({\left (d x + c\right )} n\right ) + {\left (a^{n} n^{2} - 2 \, a^{n} n\right )} \sin \left ({\left (d x + c\right )} {\left (n + 2\right )}\right ) + {\left (a^{n} n^{2} + 2 \, a^{n} n\right )} \sin \left ({\left (d x + c\right )} {\left (n - 2\right )}\right ) + 2 \, {\left (a^{n} n^{2} - 4 \, a^{n}\right )} \sin \left ({\left (d x + c\right )} n\right )\right )} e^{\left (-n\right )}}{4 \, {\left (n^{3} e^{2} - 4 \, n e^{2}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^n,x, algorithm="maxima")
[Out]
1/4*((-I*a^n*n^2 + 2*I*a^n*n)*cos((d*x + c)*(n + 2)) + (-I*a^n*n^2 - 2*I*a^n*n)*cos((d*x + c)*(n - 2)) - 2*(I*
a^n*n^2 - 4*I*a^n)*cos((d*x + c)*n) + (a^n*n^2 - 2*a^n*n)*sin((d*x + c)*(n + 2)) + (a^n*n^2 + 2*a^n*n)*sin((d*
x + c)*(n - 2)) + 2*(a^n*n^2 - 4*a^n)*sin((d*x + c)*n))*e^(-n)/((n^3*e^2 - 4*n*e^2)*d)
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 177, normalized size = 1.20 \begin {gather*} \frac {{\left (-i \, n^{2} + {\left (-i \, n^{2} + 2 i \, n\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, {\left (i \, n^{2} - 4 i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - 2 i \, n\right )} \left (\frac {2 \, e^{\left (i \, d x + i \, c + 1\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{-n - 2} e^{\left (i \, d n x + i \, c n + n \log \left (a e^{\left (-1\right )}\right ) + n \log \left (\frac {2 \, e^{\left (i \, d x + i \, c + 1\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )\right )}}{d n^{3} - 4 \, d n + {\left (d n^{3} - 4 \, d n\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (d n^{3} - 4 \, d n\right )} e^{\left (2 i \, d x + 2 i \, c\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^n,x, algorithm="fricas")
[Out]
(-I*n^2 + (-I*n^2 + 2*I*n)*e^(4*I*d*x + 4*I*c) - 2*(I*n^2 - 4*I)*e^(2*I*d*x + 2*I*c) - 2*I*n)*(2*e^(I*d*x + I*
c + 1)/(e^(2*I*d*x + 2*I*c) + 1))^(-n - 2)*e^(I*d*n*x + I*c*n + n*log(a*e^(-1)) + n*log(2*e^(I*d*x + I*c + 1)/
(e^(2*I*d*x + 2*I*c) + 1)))/(d*n^3 - 4*d*n + (d*n^3 - 4*d*n)*e^(4*I*d*x + 4*I*c) + 2*(d*n^3 - 4*d*n)*e^(2*I*d*
x + 2*I*c))
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (e \sec {\left (c + d x \right )}\right )^{- n - 2} \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((e*sec(d*x+c))**(-2-n)*(a+I*a*tan(d*x+c))**n,x)
[Out]
Integral((e*sec(c + d*x))**(-n - 2)*(I*a*(tan(c + d*x) - I))**n, x)
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((e*sec(d*x+c))^(-2-n)*(a+I*a*tan(d*x+c))^n,x, algorithm="giac")
[Out]
integrate((e*sec(d*x + c))^(-n - 2)*(I*a*tan(d*x + c) + a)^n, x)
________________________________________________________________________________________
Mupad [B]
time = 9.30, size = 227, normalized size = 1.53 \begin {gather*} \frac {\left (\cos \left (2\,c+2\,d\,x\right )-\sin \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (\frac {{\left (a+\frac {a\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}}{\cos \left (c+d\,x\right )}\right )}^n\,\left (n+2\right )}{d\,\left (n^2\,1{}\mathrm {i}-4{}\mathrm {i}\right )}+\frac {\left (\cos \left (4\,c+4\,d\,x\right )+\sin \left (4\,c+4\,d\,x\right )\,1{}\mathrm {i}\right )\,{\left (a+\frac {a\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}}{\cos \left (c+d\,x\right )}\right )}^n\,\left (n-2\right )}{d\,\left (n^2\,1{}\mathrm {i}-4{}\mathrm {i}\right )}+\frac {\left (\cos \left (2\,c+2\,d\,x\right )+\sin \left (2\,c+2\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (2\,n^2-8\right )\,{\left (a+\frac {a\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}}{\cos \left (c+d\,x\right )}\right )}^n}{d\,n\,\left (n^2\,1{}\mathrm {i}-4{}\mathrm {i}\right )}\right )}{4\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )\,{\left (\frac {e}{\cos \left (c+d\,x\right )}\right )}^{n+2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a + a*tan(c + d*x)*1i)^n/(e/cos(c + d*x))^(n + 2),x)
[Out]
((cos(2*c + 2*d*x) - sin(2*c + 2*d*x)*1i)*(((a + (a*sin(c + d*x)*1i)/cos(c + d*x))^n*(n + 2))/(d*(n^2*1i - 4i)
) + ((cos(4*c + 4*d*x) + sin(4*c + 4*d*x)*1i)*(a + (a*sin(c + d*x)*1i)/cos(c + d*x))^n*(n - 2))/(d*(n^2*1i - 4
i)) + ((cos(2*c + 2*d*x) + sin(2*c + 2*d*x)*1i)*(2*n^2 - 8)*(a + (a*sin(c + d*x)*1i)/cos(c + d*x))^n)/(d*n*(n^
2*1i - 4i))))/(4*(cos(2*c + 2*d*x)/2 + 1/2)*(e/cos(c + d*x))^(n + 2))
________________________________________________________________________________________